public class Task {
 int dd;
 int mm;
 int yy;
 int starttime;
 String strStartTime;
 int endtime;
 String strEndTime;
 String description;
 String venue;
 boolean haslabel;
 boolean hasImportance;
 String label;

 public Task(){ //for creating empty task to use in BasicFeaturesV1
  dd = 0;
  mm = 0;
  yy = 0;
  starttime = 0;
  strStartTime = "0";
  endtime = 0;
  strEndTime = "0";
  description = " ";
  venue = " ";
  haslabel = false;
  hasImportance = false;
  label = " ";
 }
 public Task(int date, int month, int year, String start, String duetime, String labelname, boolean impt, String task, String place){
  dd=date;
  mm = month;
  yy = year;
  starttime = convertStringtoint(start);
  endtime = convertStringtoint(duetime);
  strStartTime = start;
  strEndTime = duetime;
  label = labelname;
  String nothing = " ";
  if(!labelname.equals(nothing)){
   haslabel = true;
  }
  hasImportance = impt;
  description = task;
  venue = place;
    
 }

 public int getDate() {
  return this.dd;
 }

 public int getMonth() {
  return this.mm;
 }

 public int getYear() {
  return this.yy;
 }

 public int getWholeDate() {
  return this.dd*10000 + this.mm*100 + this.yy;
 }

 public int getStartTime() { 
  return this.starttime;
 }
 
 public String getstrStartTime(){
   return this.strStartTime;
 }
 
 public String getstrEndTime(){
   return this.strEndTime;
 }
 
 public int getStartTimehours(){
   return (this.starttime/100);
 }
 
 public int getStartTimeminutes(){
   return (this.starttime%100);
 }

 public int getEndTime() {
  return this.endtime;
 }

 public String getDescription(){
  return this.description;
 }
 public boolean hasLabel(){
  return this.haslabel;
 }

 public boolean hasImportance() {
  return this.hasImportance;
 }

 public String getLabel() {
  return this.label;
 }

 public String getVenue(){
  return this.venue;
 }
 
 public int convertStringtoint(String str){
   int value = Integer.parseInt(str);
   return value;
 }

 public boolean compareTask(Task item) { 
  boolean compare; 
  if(this.dd == item.getDate() && this.mm == item.getMonth() && this.yy == item.getYear()  
    && this.starttime == item.getStartTime() && this.endtime == item.getEndTime() && this.description.equals(item.getDescription()) && this.venue.equals(item.getVenue()) 
    && this.haslabel == item.hasLabel() && this.hasImportance == item.hasImportance() ){
   compare = true;
  }
  else
   compare = false;
  return compare;


 }

}
